package ${package}.modules.${moduleName}.entity;

import lombok.Data;
import lombok.EqualsAndHashCode;
import com.baomidou.mybatisplus.annotation.*;
<#list importList as i>
import ${i!};
</#list>
<#if baseClass??>
import ${baseClass.packageName}.${baseClass.code};
</#if>

/**
 * ${tableComment}
 *
 * @author ${author} ${email}
 * @since ${version} ${date}
 */
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("${tableName}")
public class ${ClassName}Entity<#if baseClass??> extends ${baseClass.code}</#if> {
private static final long serialVersionUID = 1L;

<#list fieldList as field>
<#if baseClass?? && baseClass.fields?split(",")?seq_contains(field.fieldName)>
<#else>
<#if field.fieldComment!?length gt 0>
    /**
     * ${field.commentAndDict}
     */
</#if>
<#if field.autoFill == "INSERT">
    @TableField(value="${field.fieldName}",fill = FieldFill.INSERT)
<#elseif field.autoFill == "UPDATE">
    @TableField(value="${field.fieldName}",fill = FieldFill.UPDATE)
<#elseif field.autoFill == "INSERT_UPDATE">
    @TableField(value="${field.fieldName}",fill = FieldFill.INSERT_UPDATE)
<#elseif field.primaryPk>
    @TableId
<#else>
    @TableField("${field.fieldName}")
</#if>
    private ${field.attrType} ${field.attrName};
</#if>
</#list>
}
